package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.pojo.Log;
import com.itheima.service.LogService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/log")
public class LogController {
    @Reference
    LogService logService;

    @RequestMapping("/findAll")
    public Result findAll() {
        List<Log> logs = logService.findAll();
        return Result.success("", logs);
    }
}
